-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(abstract-eth): move txBuilder to abstract-eth #4030
Conversation
No top level dependency changes detected. Learn more about Socket for GitHub ↗︎ |
34d1c76
to
baec169
Compare
protected getTransactionBuilder(): EthTransactionBuilder { | ||
return new EthTransactionBuilder(coins.get(this.getBaseChain())); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified this method because TransactionBuilder in abstract-eth is an abstract class and we can't instantiate the abstract class
c74f685
to
8548afb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commits linked in the description are invalid.
sorry for that, have updated the links in the description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice Job!!! ❤️ ❤️ , This will speed up EVM based onboarding onto SDK for future coins!! , just have some small comments
@@ -1,4 +1,4 @@ | |||
import { TransactionBuilder } from '../../src'; | |||
import { TransactionBuilder } from '../../src/lib/transactionBuilder'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we need to keep the import as is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was by mistake, ideally the previous import is working fine, will address this in a follow up
const resultEncodedParameters = EthereumAbi.rawEncode(walletSimpleConstructor, params) | ||
.toString('hex') | ||
.replace('0x', ''); | ||
return walletSimpleByteCode + resultEncodedParameters; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be we can add it to a property / method in the class to get this value which can help us abstract it further and avoid the need of redefining it each time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will address this in a follow up PR as part of this ticket WIN-1012
@@ -23,7 +23,6 @@ describe('Optimism', function () { | |||
opeth.getFamily().should.equal('opeth'); | |||
opeth.getFullName().should.equal('Optimism Ethereum'); | |||
opeth.getBaseFactor().should.equal(1e18); | |||
opeth.supportsTss().should.equal(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why I am needed as a review for this, but we are likely missing some code owner rules.
WIN-1021 BREAKING CHANGE: getTransactionBuilder method is removed from EthLikeToken class in abstract-eth module because TransactionBuilder in the abstract-eth module is abstract class and hence cannot be instantiated. Hence the implementation of TransactionBuilder can be added to the class that will inherit EthLikeToken class TransactionPrebuild from new class AbstractEthLikeNewCoins is being exported now instead of TransactionPrebuild from AbstractEthLikeCoin class as the TransactionPrebuild from AbstractEthLikeNewCoins also has support for hop transactions, batch transactions, etc TICKET: WIN-1021
8548afb
to
286ccfd
Compare
The main purpose of this PR is to move TransactionBuilder and other related classes from sdk-coin-eth to abstract-eth module. This is being done as part of refactoring effort to make it easy to add new eth-like chains.
This PR has 8 commits
This commit moves the transaction builder from sdk-coin-eth to abstract-eth module. As part of this commit we are avoiding to make any imports from sdk-coin-eth in abstract-eth module and instead moving all the required classes and methods in abstract-eth module. This commit also adds a new class AbstractEthLikeNewCoins. This class will be inherited by all the eth-like coins like polygon, arbitrum, optimism, bsc
This commit makes changes in sdk-coin-polygon related to txBuilder refactor.
This commit
makes changes in sdk-coin-arbeth related to txBuilder refactor. It adds getContractData method for arbeth. It also adds bytecode and abi for the ArbethWalletSimple contract
This commit
makes changes in sdk-coin-opeth related to txBuilder refactor. It adds getContractData method for arbeth. It also adds bytecode and abi for the OpethWalletSimple contract
This commit makes changes in sdk-coin-ethw related to txBuilder refactor.
This commit fixes the issue related to bignumber package versions
This commit deletes the MPC related classes as we will use AbstractEthLikeNewCoins class for multisig and MPC related methods for all the upcoming EthLike coins
This commit exports Ethereum Transactionbuilder and Transfer builder as this was the behavior before this change
WIN-1021
TICKET: WIN-1021